<?php

use console\db\Migration;
use yii\db\Query;

/**
 * 会员卡申请追加
 * 
 * @author emhome <emhome@163.com>
 * @since 1.0
 */
class m310030_000020_t_reset_card extends Migration {

    /**
     * @inheritdoc
     */
    public function safeUp() {
        $this->update('{{%card_order}}', [
            'expired_at' => 0
        ], [
            '!=', 'expired_at', 0
        ]);
        $this->update('{{%freight_receiver}}', [
            'from' => 'card'
        ], [
            'from' => 'card2'
        ]);
    }

}
